package com.tencent.mlvb.apilive.network;

import com.tencent.mlvb.apilive.bean.JobRegion;
import com.tencent.mlvb.apilive.bean.LivePlanBean;
import com.tencent.mlvb.apilive.bean.Manipulators;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ApiRequestService {
    /**
     * 登录
     *
     * @param requestBody
     * @return
     */
    @POST("login/uavlogin")
    Observable<ResponseModel<String>> origin(@Query("username")String username,@Query("sign")String sign);

    /**
     * 获取作业区
     */
    @GET("base/option/jobRegion")
    Observable<ResponseModel<List<JobRegion>>> jobRegion();

    /**
     * 获取无人机&飞手
     */
    @GET("base/option/uav")
    Observable<ResponseModel<List<Manipulators>>> getManipulators();

    /**
     * 未完成直播接口
     */
    @POST("push/uavtask/check")
    Observable<ResponseModel<LivePlanBean>> incomplete(@Query("code")String ccode, @Query("uavId")String uavId, @Query("sign")String sign);

    /**
     * 获取直播计划表
     */
    @GET("push/pipelinestask/export")
    Observable<ResponseModel<List<LivePlanBean>>> export(@Query("actionDateStr") String actionDateStr, @Query("jobRegionCode") String jobRegionCode, @Query("sign")String sign);

    /**
     * 添加直播任务
     */
    @POST("push/uavtask/add")
    Observable<ResponseModel<LivePlanBean>> addLive( @Query("jobRegionCode") String jobRegionCode,@Query("pipelinesTaskId") String pipelinesTaskId, @Query("uavId") String uavId,@Query("sign")String sign);

    /**
     * 删除直播
     */
    @POST("push/uavtask/delete/{id}")
    Observable<ResponseModel<Object>> deleteLive(@Path("id")String id,@Query("sign")String sign);
    /**
     * 开始直播任务
     */
    @POST("push/uavtask/start/{id}")
    Observable<ResponseModel<Object>> startLive(@Path("id")String id,@Query("sign")String sign);
    /**
     * 结束直播任务
     */
    @POST("push/uavtask/end/{id}")
    Observable<ResponseModel<Object>> endLive(@Path("id")String id,@Query("sign")String sign);

}
